<div class="form">

<script type="text/javascript" language="javascript">
	$(document).ready(function () {
		$('#JobOtherDetails_physical_challenged').change(function() {
			var selected = $(this).val();
			if(selected == 0){
			  $('#remove_div').show();
			}
			else{
			  $('#remove_div').hide();
			}
		});
	});
</script>

<?php $form=$this->beginWidget('CActiveForm', array(
	'id'=>'desired-job-desire_job-form',
	'enableAjaxValidation'=>false,
	'enableClientValidation'=>true,
)); ?>

	<p class="note">Fields with <span class="required">*</span> are required.</p>

	<?php echo $form->errorSummary($modelDesJob); ?>
	
	<?php 	
		//Onclick of state, stateID will be posted by ajax and on the basis of stateID it will return list of city names
		$arrOptionsCity = array('prompt'=>'Select State','ajax'=> array('type'=>'POST',
				'url' => CController::createUrl('secondRegister/SearchCity'),
				'update'=>'#DesiredJob_djob_cityID'));
	?>

	<div class="row">
		<?php echo $form->labelEx($modelDesJob,'job_type'); ?>
		<?php echo $form->dropDownList($modelDesJob,'job_type',ApplicationConfig::app()->params['vendor_params']['jobType'],array('empty' => 'Select Job Type')); ?>
		<?php echo $form->error($modelDesJob,'job_type'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($modelDesJob,'industry'); ?>
		<?php echo $form->textField($modelDesJob,'industry'); ?>
		<?php echo $form->error($modelDesJob,'industry'); ?>
	</div>
	
	<div class="row">
		<?php echo $form->labelEx($modelDesJob,'djob_stateID'); ?>
		<?php echo $form->dropDownList($modelDesJob,'djob_stateID',State::model()->getStates(), $arrOptionsCity); ?>
		<?php echo $form->error($modelDesJob,'djob_stateID'); ?>
	</div>
	
	<div class="row">
		<?php echo $form->labelEx($modelDesJob,'djob_cityID'); ?>
		<?php echo $form->dropDownList($modelDesJob,'djob_cityID',array(), array('empty' => 'Select a City')); ?>
		<?php echo $form->error($modelDesJob,'djob_cityID'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($modelDesJob,'profile'); ?>
		<?php echo $form->textField($modelDesJob,'profile'); ?>
		<?php echo $form->error($modelDesJob,'profile'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($modelDesJob,'salary'); ?>
		<?php echo $form->textField($modelDesJob,'salary'); ?>
		<?php echo $form->error($modelDesJob,'salary'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($modelJobDet,'goals'); ?>
		<?php echo $form->textField($modelJobDet,'goals'); ?>
		<?php echo $form->error($modelJobDet,'goals'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($modelJobDet,'hobbies'); ?>
		<?php echo $form->textField($modelJobDet,'hobbies'); ?>
		<?php echo $form->error($modelJobDet,'hobbies'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($modelJobDet,'language_known'); ?>
		<?php echo $form->textField($modelJobDet,'language_known'); ?>
		<?php echo $form->error($modelJobDet,'language_known'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($modelJobDet,'physical_challenged'); ?>
		<?php echo $form->dropDownList($modelJobDet,'physical_challenged',ApplicationConfig::app()->params['scaling_params']['phyChallenge']); ?>
		<?php echo $form->error($modelJobDet,'physical_challenged'); ?>
	</div>

	<div class="row" id="remove_div">
		<?php echo $form->labelEx($modelJobDet,'description'); ?>
		<?php echo $form->textField($modelJobDet,'description'); ?>
		<?php echo $form->error($modelJobDet,'description'); ?>
	</div>

	<div class="row buttons">
		<?php echo CHtml::submitButton('Submit'); ?>
		<?php echo CHtml::link('Skip',ApplicationConfig::getURL("user_register", "secondRegister", "workExp"),array()); ?>
	</div>

<?php $this->endWidget(); ?>

</div><!-- form -->